#pragma once
#include "dataStruct.h"

// CClientSocket command target

class CClientSocket : public CSocket
{
public:
	CClientSocket(callBack pCallBack= NULL);
	virtual ~CClientSocket();
	bool initialSocket(unsigned long nPort,const CString& ipStr);
	bool initialUDPSocket(unsigned long nPort);
	void  send(netData& sendData);
	virtual void OnReceive(int nErrorCode);
private:
	callBack 		m_pCallBackFun;
	unsigned int	m_nTCPServerPort;
	CString			m_TCPServerIP;
	bool			m_isUDPType;
};

bool waitForSocket(int Times);


